/*
 * @Author: SongXiao
 * @Date: 2023-02-27 14:13:29
 * @LastEditors: SongXiao
 * @LastEditTime: 2023-04-24 17:00:50
 * @Description: file content
 */
import React from 'react';
import ReactDOM from 'react-dom/client';
import {
  RouterProvider,
  createHashRouter
} from "react-router-dom";
import Main from './router/main';
import WeatherChart from './weather/chart';
import MapShow from './map';
import Demo1 from './weather/demo/1';
import Demo2 from './weather/demo/2';
import Demo3 from './weather/demo/3';
import Demo4 from './weather/demo/4';
import Demo5 from './weather/demo/5';
import Demo6 from './weather/demo/6';
import Demo7 from './map/demo/2';
import './index.css';
// import reportWebVitals from './reportWebVitals';

const router = createHashRouter([
  {
    path: "/",
    element: <Main />,
  },
  {
    path: "/weather/map",
    element: <MapShow />,
  },
  {
    path: "/weather/chart",
    element: <WeatherChart />,
  },
  {
    path: "/demo/1",
    element: <Demo1 />,
  },
  {
    path: "/demo/2",
    element: <Demo2 />,
  },
  {
    path: "/demo/3",
    element: <Demo3 />,
  },
  {
    path: "/demo/4",
    element: <Demo4 />,
  },
  {
    path: "/demo/5",
    element: <Demo5 />,
  },
  {
    path: "/demo/6",
    element: <Demo6 />,
  },
  {
    path: "/demo/7",
    element: <Demo7 />,
  },
]);

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <React.StrictMode>
    <RouterProvider router={router} />
  </React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
// reportWebVitals();
